#ifndef XDIVA_TYPEENTRYFRAMEITEM_H
#define XDIVA_TYPEENTRYFRAMEITEM_H

#include "PanelItem.h"

class DiagramScene;
class TypeUnfoldArrayButton;
class WOP_Entry;
class TypeEntryItem;
class AbstractPanel;

class TypeEntryFrameItem :
	public PanelItem
{
public:

	TypeEntryFrameItem( WOP_Entry* , std::vector<xMappingNode*>& , DiagramScene*, AbstractPanel* );
	~TypeEntryFrameItem(void);
	void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
	QRectF boundingRect() const;
	void setExpanded(bool);
	bool getExpanded();
	void setupPort();
	void remove();

private:
	DiagramScene* _scene;
	WOP_Entry* _wopEntry;
	std::vector<TypeEntryItem* > _entryNodes;
	bool _isExpanded;
	TypeUnfoldArrayButton * _changeTypeButton;
	void createEntryNodes(std::vector<xMappingNode*>&);
	void unfoldArray(bool);
};

#endif
